<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            background: #fcf3ec;
            margin: 0;
        }

        .button {
            --offset: 10px;
            --border-size: 2px;

            position: relative;
            padding: 1.5em 3em;
            appearance: none;
            border: 0;
            background: transparent;
            color: #e55743;
            text-transform: uppercase;
            letter-spacing: .25em;
            outline: none;
            cursor: pointer;
            font-weight: bold;
            transition: background .8s ease;
        }

        .button:hover {
            background: rgba(100, 0, 0, .03);
        }

        .button__horizontal,
        .button__vertical {
            position: absolute;
            top: calc(var(--offset) * -1);
            right: calc(var(--offset) * -1);
            bottom: calc(var(--offset) * -1);
            left: calc(var(--offset) * -1);
            transition: transform .8s ease;
        }

        .button__horizontal {
            border-top: var(--border-size) solid currentColor;
            border-bottom: var(--border-size) solid currentColor;
            transform-origin: left;
        }

        .button__vertical {
            border-left: var(--border-size) solid currentColor;
            border-right: var(--border-size) solid currentColor;
            transform-origin: top;
        }

        .button:hover .button__horizontal {
            transform: scaleX(0);
        }

        .button:hover .button__vertical {
            transform: scaleY(0);
        }
    </style>
</head>
<body>
    <button class="button">
        Fancy Button
        <div class="button__horizontal"></div>
        <div class="button__vertical"></div>
    </button>
</body>
</html>